#pragma once
#include "LuaObject.h"

class LuaFunction;

class LUAOBJ_API LuaThread:public LuaObject
{
public:
    LuaThread();
    LuaThread(LuaObjectImpl* impl);
    LuaThread(LuaState* owner);

	~LuaThread();

	bool isValid();

    LuaState* thread();

    void resume(LuaFunction func);
    void resume(LuaFunction func, LuaObject arg1);
    void resume(LuaFunction func, LuaObject arg1, LuaObject arg2);
    void resume(LuaFunction func, LuaObject arg1, LuaObject arg2, LuaObject arg3);
    void resume(LuaFunction func, LuaObject arg1, LuaObject arg2, 
        LuaObject arg3, LuaObject arg4);

    void resume();
    void resume(LuaObject arg1);
    void resume(LuaObject arg1, LuaObject arg2);
    void resume(LuaObject arg1, LuaObject arg2, LuaObject arg3);
    void resume(LuaObject arg1, LuaObject arg2,
        LuaObject arg3, LuaObject arg4);
};
